package com.hyj.shop.project.goods.service.impl;

import com.hyj.shop.project.utils.domain.Msg;

import com.hyj.shop.project.goods.domain.Goods;
import com.hyj.shop.project.goods.mapper.HotGoodsMapper;
import com.hyj.shop.project.goods.service.HotGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HotGoodsServiceImpl implements HotGoodsService {
    @Autowired
    private HotGoodsMapper hotGoodsMapper;
    @Override
    public Msg queryGoodsByPage() {
        List<Goods> list =hotGoodsMapper.queryGoodsBypage();
        Msg msg = new Msg();
        msg.setData(list);
        msg.setCode(200);
        msg.setStatus("success");
        return msg;
    }

    @Override
    public Msg queryGoodsAll() {
        List<Goods> list =hotGoodsMapper.queryGoodsAll();
        Msg msg = new Msg();
        msg.setData(list);
        msg.setCode(200);
        msg.setStatus("success");
        return msg;
    }

    @Override
    public List<Goods> selectGoodsByPage(Goods goods) {
        return hotGoodsMapper.selectGoodsByPage(goods);
    }
}
